<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>hello</title>
	</head>
	<body>
		<div id="app">
			
			<h1>猜数字小游戏</h1><br>
			请输入你的猜测(0-9)<input v-model="usernum" />
			<p v-if="keynum==usernum">恭喜你猜对了，你真是个小天才</p>
			<p v-if="keynum<usernum">猜大了</p>
			<p v-if="keynum>usernum">猜小了</p>
		</div>
			
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var vm=new Vue({
				el:'#app',
				data:{
					keynum:Math.floor(Math.random()*10),
					usernum:''
				}
			})
		</script>
	</body>
</html>
